package com.xinghou.platform.dao.main;

import java.sql.Timestamp;
import java.util.List;

import org.springframework.dao.DataAccessException;

import com.xinghou.platform.model.main.UserRelationFrom;

public interface UserRelationFromDAO {
	 public UserRelationFrom getUserRelationFromById(Integer Id)throws DataAccessException;
	 
	 public int updateUserRelationFrom(UserRelationFrom userRelationFrom) throws DataAccessException;
		
	 public int saveUserRelationFrom(UserRelationFrom userRelationFrom) throws DataAccessException;
	 
	 /**
	  * 根据fromid与touserid 获得 from轮询表
	  * @param fromUserId
	  * @param toUserId
	  * @return
	  */
	 public UserRelationFrom getUserRelationFromByUserId(Integer fromUserId,Integer toUserId);



	 
	 /**
	  * 查询我关注Users
	  * @param fromUserId 用户ID
	  * @return
	  */
	 public List<UserRelationFrom> getUserRelationFromByToUserId(Integer fromUserId,Integer startno,Integer pagesize);


	public int getFollowCountByUserid(Integer fromUserid);

	public int getFansCountByUserid(Integer fromUserid);
	 
	 /**
	  * 查询我关user注集合
	  * @param fromUserId	用户ID
	  * @param id			
	  * @param rowNum		行数
	  * @return
	  * @throws DataAccessException
	  */
	 public List<UserRelationFrom> getUserRelationFromList(int fromUserId,Timestamp id,int rowNum) throws DataAccessException;
}
